package com.pigs.pigsordersystem.mapper;

import com.pigs.pigsordersystem.entity.AdminEntity;
import com.pigs.pigsordersystem.entity.UsersEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

/**
 * 客户mapper 接口
 *
 * @author Y.yang
 * @since 2020-03-14
 */
@Repository
public interface UsersMapper extends BaseMapper<UsersEntity> {

    /**
     * 客户登录
     *
     * @param name
     * @param userPassword
     * @return
     */
    @Select("select name,user_password,status from users where name=#{name} and user_password=#{userPassword}")
    public UsersEntity loginUser(String name, String userPassword);


}
